<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xml:space="preserve"
        xmlns:xen="http://xendri.ru/">
    <xsl:output method="html" indent="yes" encoding="UTF-8" />
    <xsl:template match='head' name='head' mode='index'>
    <![CDATA[
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>
            Открытое радио.
        </title>
        <link rel='stylesheet' href='/screen.css'/>
        <link rel='stylesheet' href='/index.css'/>
        <script type='text/javascript' src='/file/lib/jquery.js'>
        </script>
        <script language='javascript'>
            function replace_o() {
            return;
                var text = document.body.innerHTML;
                var tag = false;
                var skp = false;
                var ot = '<i class="o">';
                var ct = '</i>';
                var x = 0;
                while (x < text.length) {
                    if (tag) {
                        if (text.charAt(x) == '>') tag = false;
                    } else if (text.charAt(x) == '<') {
                        tag = true;
                    } else if (skp) {
                        skp = false;
                        x++;
                        continue;
                    }else if (text.charAt(x) == '\\') {
                        skp = true;
                        text = text.slice(0, x) + text.slice(x+1);
                        continue;
                    }else if (text.charAt(x).search(/[оo]/i) > -1) {
                        text = text.slice(0, x)+ot+text.charAt(x)+ct+text.slice(x+1);
                        x += ot.length + ct.length;
                    }
                    x++;
                }
                document.body.innerHTML = text;
            }
        </script>
    </head>
    <body onload='replace_o()' class=']]><xsl:value-of select='$q.cu'/><![CDATA['>
    <table id='content' width='930' height='100%;' align='center'>]]>
    </xsl:template>
    <xsl:template match='header' mode='index'>
            <xsl:param name='haction'/>
            <tr height='1' id='menutd'>
                <td id='menu' valign='top'>
                    <xsl:if test='$haction = ""'>
                        <font class='logo'>Открытое радио</font><wbr/><nobr class='nav'>(<a href='/team.html'>команда</a>,&amp;nbsp;<a href='#'>программа</a>,&amp;nbsp;<a href='#'>архив</a>,&amp;nbsp;<a href='#'>проекты</a>)</nobr><wbr/><font class='listen'><a href='#'>слушать</a>!</font><br/>
                    </xsl:if>
                    <xsl:if test='$haction != ""'>
                        <font class='logo'><a href='/'>Открытое радио</a></font><wbr/><nobr class='nav'>(<a href='/team.html'>команда</a>,&amp;nbsp;<a href='#'>программа</a>,&amp;nbsp;<a href='#'>архив</a>,&amp;nbsp;<a href='#'>проекты</a>)</nobr><wbr/><font class='listen'><xsl:value-of select="$haction"/>!</font><br/>
                    </xsl:if>
                </td>
            </tr>
    </xsl:template>
    <xsl:template match='menu'>
    </xsl:template>
    <xsl:template match='footer'>
        <script type='text/javascript'>
            //setTimeout(replace_o, 1000);
        </script>
		<![CDATA[</table>
                </body>
		</html>]]>
    </xsl:template>
</xsl:stylesheet>